#include "stdafx.h"
#include "Opponent.h"
#include "point.h"
#include <time.h>

// test if a guess already made
bool Opponent::alreadyGuessed(Board guessBoard, int x, int y)
{
	if ( guessBoard.getBoardValue(x,y) != '-' ) return true;
	return false;
}



// make guess for oponent
Point Opponent::makeGuess(Board* guessBoard)
{
	int x = 0;
	int y = 0;
	Point p;
	if ( guessBoard->getNumHits() == 0 )
	{
		p = guessBoard->getRandomPatternHit();
		return p;
	}
	else
	{
		p = guessBoard->getHit();
		return p;
	}
	return p;
}